package cc.pattern.decorate;

import cc.pattern.util.Console;
import org.junit.Test;

public class Test1 {
	@Test
	public void Main() {
		Beverage beverage = new HandCake("包子",2);
		Console.log("类型:" + beverage.getDesc() + "===========价格：" + beverage.price()+"===========大小："+beverage.getSize());

		beverage = new FiredEgg(beverage);
		beverage = new FiredEgg(beverage);
		beverage = new Pork(beverage);
		beverage = new Leeks(beverage);
		beverage = new Chicken(beverage);

		Console.log("类型:" + beverage.getDesc() + "===========价格：" + beverage.price());
		
		Beverage b = new Steamed();
		b = new Leeks(b);
		Console.log("类型:" + b.getDesc() + "===========价格：" + b.price());
	}

}
